//
//  BubbleTableView.h
//  Saas
//
//  Created by 黄志刚 on 2020/3/12.
//  Copyright © 2020 bing. All rights reserved.
//

#import "BubbleView.h"

NS_ASSUME_NONNULL_BEGIN


typedef void (^BubbleCellClickBlock)(NSInteger row, NSString *rowString, NSArray *fromDataArray);// 气泡隐藏后回调

@interface BubbleTableView : BubbleView

- (instancetype)initWithLocation:(BubbleLocation)location
                 bubbleAlignment:(BubbleAlignment)alignment
                           width:(CGFloat)width
                          height:(CGFloat)height
                  cellClickBlock:(BubbleCellClickBlock)cellClickBlock
                       hideBlock:(BubbleHideBlock)hideBlock;

- (void)showWithTargetView:(UIView *)targetView
             maskSuperView:(UIView *)maskSuperView;

- (void)hide;

//- (void)updateBubble:(NSArray <NSString *>*)dataArray;

/// 更新气泡弹框
/// @param dataArray 显示的数据
/// @param fromDataArray 带过来的数据（未了避免block内部访问外部变量）
- (void)updateBubble:(NSArray <NSString *>*)dataArray fromDataArray:(NSArray *)fromDataArray;


- (void)updateBubbleWithLeftArray:(NSArray <NSString *>*)dataArray rightArrray:(NSArray <NSString *>*)rightArray fromDataArray:(NSArray *)fromDataArray;


@property (nonatomic,assign) CGFloat bubbleCellHeight;
@property (nonatomic,assign) NSTextAlignment bubbleCellTextAlignment;
@property (nonatomic,copy) UIFont *bubbleCellTextFont;
@property (nonatomic,assign) BOOL isBubbleScrollEnabled;
@property (nonatomic,assign) NSInteger selectRow;

@end

NS_ASSUME_NONNULL_END
